/*
 * Copyright 2006-2008 Michele Mostarda ( michele.mostarda@gmail.com ).
 * All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the 'License');
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an 'AS IS' BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.graphnav.model;

import org.graphnav.swing.Arc;
import org.graphnav.swing.Node;

import java.awt.Point;

/**
 * Defines a modifiable graph model.
 */
public interface ModifiableGraphModel extends GraphModel{

    /**
     * Adds a node to the model.
     *
     * @param node
     */
    public void addNode(Node node);

    /**
     * Removes a node.
     *
     * @param node
     */
    public void removeNode(Node node);

    /**
     * Adds an arc to the model.
     *
     * @param a
     */
    public void addArc(Arc a);

    /**
     * Removes an arc.
     *
     * @param a
     */
    public void removeArc(Arc a);

    /**
     * Creates a node.
     *
     * @param data
     * @param position
     * @return
     */
    public Node createNode(Object data, Point position);

    /**
     * Creates an arc.
     * 
     * @param source
     * @param dest
     * @param data
     * @return
     */
    public Arc createArc(Node source, Node dest, Object data);
}
